/*
 *
A(void)
A(void)
A(void)
~A()
~A()
~A()

 */
#include <iostream>
#include <cstdio>
using namespace std;
class A{
	public:
		A(void){
			cout << "A(void)" << endl;
		}
		~A(){
			cout << "~A()" << endl;
		}
};
int func3(){
	A c;
	FILE *fp = fopen("./a.txt", "r");
	if(fp  == NULL){
		return -1;
	}
	cout << "open a.txt successed" << endl;
	fclose(fp);
	return 0;
}
int func2(){
	A b;
	if(func3() == -1)
		return -1;
	return 0;
}
int func1(void){
	A a;
	if(func2() == -1)
		return -1;
	return 0;
}
int main(void){
	func1();
	return 0;
}
